package thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-01-04
 * Time:22:57
 */
public class Demo2 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            System.out.println("线程启动");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
        t.start();
        System.out.println("线程关闭");
        t.join();
    }
}
